callback function AKA code function
W indow T oFunction converts any design window into a grid function and a callback function.

When important events occur in a grid, its grid function calls the callback function and passes it message arguments that describe the situation. You can put code in callback functions to respond to any combination of events reported by the grid function, from none to all.

What constitutes an important event depends on the grid type. MouseDown + MouseUp generates a callback message in an XuiPushButton grid, but not in an XuiTextLine , while an Enter keystroke generates a callback in both grid types.

GraphicsDesigner messages
When a basic event takes place in a graphics window, GraphicsDesigner creates a message to describe the event. Whenever the state of keyboard, mouse, or window changes, GraphicsDesigner creates a message. Every message contains 8 arguments:

A window or grid number to identify the window or grid the message refers to.
A message number to identify the nature of the event that occurred.
6 general purpose arguments whose meanings depend on the message number.

GraphicsDesigner messages include WindowKeyDown, WindowResized, MouseDown, TimeOut.

GuiDesigner messages
Processing each GraphicsDesigner message typically causes other activity, involving additional GuiDesigner messages. GuiDesigner automatically maintains the GUI, tells your program about the event, and processes messages your program sends to update the GUI.

Each step in this process is a function in GuiDesigner or your program processing a message sent to it by another function.

GuiDesigner recognizes over 100 messages like Create, Destroy, HideWindow, Redraw, Resize, SetColor, SetTextString .

Messages are a fundamental part of GuiDesigner and GUI programs. Messages are pre-defined for every standard aspect of GUIs, and standard message processing functions are provided with GuiDesigner to process these messages appropriately.

░  Routine messages are processed automatically by grid functions.
░  Your programs send messages to grids to control the GUI.
░  Grid functions send callback messages to your program when important events occur.